package com.nuoniu.sibanyun.entity.crm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import com.nuoniu.sibanyun.entity.bo.JsonData;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 客户基本信息
 * </p>
 *
 * @author baiqiang
 * @since 2020-06-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("pub_customer")
@ApiModel(value="CrmCustomer对象", description="客户基本信息")
public class CrmCustomer extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "客户名称")
    @TableField("crm_name")
    private String crmName;

    @ApiModelProperty(value = "客户简称")
    @TableField("crm_simple_name")
    private String crmSimpleName;

    @ApiModelProperty(value = "客户类型 0公海客户 1潜在客户 2成交客户")
    @TableField("crm_type")
    private Integer crmType;

    @ApiModelProperty(value = "客户编号")
    @TableField("crm_no")
    private String crmNo;

    @ApiModelProperty(value = "客户来源")
    @TableField("crm_source")
    private String crmSource;

    @ApiModelProperty(value = "统一社会信用代码")
    @TableField("usc_code")
    private String uscCode;

    @ApiModelProperty(value = "类型: 客户,代理商,渠道商,合作伙伴")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "公司ID")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "公司名称")
    @TableField("company_name")
    private String companyName;

    @ApiModelProperty(value = "部门ID")
    @TableField("office_id")
    private Integer officeId;

    @ApiModelProperty(value = "部门名称")
    @TableField("office_name")
    private String officeName;

    @ApiModelProperty(value = "汉语拼音")
    @TableField("phonetic")
    private String phonetic;

    @ApiModelProperty(value = "注册资金")
    @TableField("register_capital")
    private String registerCapital;

    @ApiModelProperty(value = "省市ID")
    @TableField("area_id")
    private Integer areaId;

    @ApiModelProperty(value = "省市编码")
    @TableField("area_code")
    private String areaCode;

    @ApiModelProperty(value = "省市名称")
    @TableField("area_name")
    private String areaName;

    @ApiModelProperty(value = "省市编码树（包括当前编码）")
    @TableField("area_tree_codes")
    private String areaTreeCodes;

    @ApiModelProperty(value = "街道（联系地址）")
    @TableField("street")
    private String street;

    @ApiModelProperty(value = "电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "电子邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "法人代表")
    @TableField("legal_person")
    private String legalPerson;

    @ApiModelProperty(value = "网址")
    @TableField("url")
    private String url;

    @ApiModelProperty(value = "微博")
    @TableField("blog")
    private String blog;

    @ApiModelProperty(value = "传真")
    @TableField("fax")
    private String fax;

    @ApiModelProperty(value = "登记时间")
    @TableField("register_date")
    private LocalDateTime registerDate;

    @ApiModelProperty(value = "标签")
    @TableField("label")
    private String label;

//    @ApiModelProperty(value = "区域")
//    @TableField("region")
//    private String region;

    @ApiModelProperty(value = "邮政编码")
    @TableField("postal_code")
    private String postalCode;

    @ApiModelProperty(value = "客户星级")
    @TableField("crm_grade")
    private String crmGrade;

    @ApiModelProperty(value = "客户类别")
    @TableField("crm_category")
    private String crmCategory;

    @ApiModelProperty(value = "客户性质")
    @TableField("crm_nature")
    private String crmNature;

    @ApiModelProperty(value = "企业规模")
    @TableField("enterprise_scale")
    private String enterpriseScale;

    @ApiModelProperty(value = "所属行业")
    @TableField("industry")
    private String industry;

    @ApiModelProperty(value = "领用人id")
    @TableField("collar_user_id")
    private Integer collarUserId;

    @ApiModelProperty(value = "领用人姓名")
    @TableField("collar_user_name")
    private String collarUserName;

    @ApiModelProperty(value = "领用时间")
    @TableField("collar_time")
    private LocalDateTime collarTime;

    @ApiModelProperty(value = "上次领用人id")
    @TableField("last_collar_user_id")
    private Integer lastCollarUserId;

    @ApiModelProperty(value = "上次领用人姓名")
    @TableField("last_collar_user_name")
    private String lastCollarUserName;

    @ApiModelProperty(value = "上次领用时间")
    @TableField("last_collar_time")
    private LocalDateTime lastCollarTime;

    @ApiModelProperty(value = "释放时间")
    @TableField("release_time")
    private LocalDateTime releaseTime;

    @ApiModelProperty(value = "上次联系时间")
    @TableField("last_touch_date")
    private LocalDateTime lastTouchDate;

    @ApiModelProperty(value = "上次联系摘要")
    @TableField("last_touch_summary")
    private String lastTouchSummary;

    @ApiModelProperty(value = "下次联系时间")
    @TableField("next_touch_date")
    private LocalDateTime nextTouchDate;


    @ApiModelProperty(value = "自动释放 1是 0否")
    @TableField("is_release")
    private Boolean isRelease;

    @ApiModelProperty(value = "描述")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人名称")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "修改人id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "修改人名称")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "状态(0:正常 1:删除 2：停用  3：待审核 )")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "审批状态 0:未审核 1:已审核 2:审核中")
    @TableField("approval_type")
    private Integer approvalType;

    @ApiModelProperty(value = "共享（0：非共享 1：共享）")
    @TableField("share_type")
    private Integer shareType;

    @ApiModelProperty(value = "共享的菜单")
    @TableField("share_menu")
    private String shareMenu;

    @ApiModelProperty(value = "共享的用户")
    @TableField("share_user_id")
    private String shareUserId;

    @ApiModelProperty(value = "共享用户姓名")
    @TableField("share_user_name")
    private String shareUserName;

    @ApiModelProperty(value = "有效时间")
    @TableField("share_time")
    private String shareTime;

    @ApiModelProperty(value = "1永久有效 0有效时间")
    @TableField("share_end")
    private Integer shareEnd;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

    @ApiModelProperty(value = "收藏")
    @TableField("collect")
    private String collect;

    @ApiModelProperty(value = "手机")
    @TableField("mobile")
    private String mobile;

    @ApiModelProperty(value = "释放人id")
    @TableField("release_user_id")
    private Integer releaseUserId;

    @ApiModelProperty(value = "释放人姓名")
    @TableField("release_user_name")
    private String releaseUserName;

    @ApiModelProperty(value = "是否财务使用")
    @TableField("is_finance")
    private Boolean isFinance;

    @ApiModelProperty(value = "是否客户")
    @TableField("is_customer")
    private Boolean isCustomer;

    @ApiModelProperty(value = "是否供应商")
    @TableField("is_supplier")
    private Boolean isSupplier;

    @ApiModelProperty(value = "是否其他往来单位")
    @TableField("is_other")
    private Boolean isOther;


    @ApiModelProperty(value = "是否外呼任务执行中")
    @TableField("is_tasking")
    private Boolean isTasking;

    @ApiModelProperty(value = "外呼任务ID")
    @TableField("crm_task_id")
    private Boolean crmTaskId;

    @ApiModelProperty(value = "联系人集合")
    @TableField(exist = false)
    private List<CrmLinkman> crmLinkmanList;




}
